/*
 * Phase.h
 *
 *  Created on: 30/10/2011
 *      Author: godinho
 */

#ifndef TLS_PHASE_H_
#define TLS_PHASE_H_

#include <vector>

class TLSLink;

/**
 * Stores data about a TLS phase.
 *
 * A phase consist on a set of allowed links and a duration time.
 */
class TLSPhase {
public:
	/**
	 * Construct an empty phase.
	 */
	TLSPhase(int duration);

	/**
	 * Release object.
	 */
	virtual ~TLSPhase();

	/**
	 * Number of steps that this phase must be activated.
	 */
	int getDuration();

	/**
	 * Returns a list of links for this phase.
	 */
	std::vector<TLSLink*> getLinks();

	/**
	 * Add a link for this phase.
	 */
	void addLink(TLSLink* link);

	void setId(int id);

	int getId();

private:

	int mDuration;

	std::vector<TLSLink*> mLinks;

	int mId;
};

#endif /* TLS_PHASE_H_ */
